﻿namespace MovieTicket.WebApi
{
    using System.Web.Http;
    using System.Web.Mvc;
    using System.Web.Routing;

    using MovieTicket.WebApi.Handlers;

    /// <summary>
    /// Class WebApiApplication
    /// </summary>
    public class WebApiApplication : System.Web.HttpApplication
    {
        #region Methods

        /// <summary>
        /// Application_s the start.
        /// </summary>
        protected void Application_Start()
        {
            GlobalConfiguration.Configuration.MessageHandlers.Add(new AuthMessageHandler());

            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
        }

        #endregion
    }
}